package com.asm.repository;

import com.asm.entity.sys.District;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

public interface DistrictRepository extends JpaRepository<District, Long> {
    Page<District> findByProvince(String province, Pageable page);

    Page<District> findByCity(String city, Pageable page);

    @Query("select c from District c where c.isDel=false ")
    Page<District> findAll(PageRequest of);
}
